using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Globalization;

/// <summary>
/// Summary description for PageBase
/// </summary>
public class PageBase: System.Web.UI.Page
{
    public string pageCulture = "tw";

	public PageBase()
	{
    }

    protected override void OnPreInit(EventArgs e)
    {
        string selectedLanguage = "zh-TW";
        string theme = "tw";
        if (Request.QueryString.Count > 0)
        {
            if (String.Equals(Request.QueryString[0].ToString(), "cn", StringComparison.OrdinalIgnoreCase))
            {
                theme = "cn";
                selectedLanguage = "zh-CN";
                pageCulture = "cn";
            }
        }
        this.Theme = theme;
        this.Culture = selectedLanguage;
        this.UICulture = selectedLanguage;
        base.OnPreInit(e);
    }

    protected override void OnLoad(EventArgs e)
    {
        this.Title = Resources.resource.pageTitle;
        base.OnLoad(e);
    }
}
